package test_achieve.web.scenes;
import constant.Pm;
import cucumber.api.java.en.Given;
import test_achieve.web.Merchant;
import test_achieve.web.Oneself;
import test_achieve.web.OrderMain;

/**
 * Created by chenkuo on 2017/10/23.
 */
public class CollectionPay {

    /**代收货款场景封装*/

    /**前置：无
     * 步骤：登录，切成城市，详情输入，下单*/

    @Given("^w用户下了一个一取一投代收货款及时单"+ Pm.p12)
    public void w用户下了一个代收货款及时单(String username,String city,String sendAdress,String sendName,String sendMobile,String receiveAddress,String receiveName,String receiveMobile,String weight,String goodsName,String remark,String goodsMoney) throws Throwable {
        Basic basic = new Basic();
        basic.w登录并切换城市( username, city);
        Oneself me = new Oneself();
        me.w进入在线下单界面();
        OneToOne oneToOne = new OneToOne();
        oneToOne.w输入一取一投订单信息( sendAdress, sendName, sendMobile, receiveAddress, receiveName, receiveMobile, weight, goodsName, remark);
        Merchant merchant = new Merchant();
        merchant.w输入代收货款金额代收货款(goodsMoney);
        //可能要点击两次下一步
        OrderMain webmain = new OrderMain();
        webmain.wDaiClickNex();
        webmain. wSubmitOrder();
        webmain.w确认订单提交成功();

    }
}
